import startView from './startView';
import Lazy from './../components/Lazy';

export interface Route {
    name: string,
    path: string,
    outJmp?:boolean,
    lockPage?: boolean,
    component: Function,
    children?: Array<Route>
}

const configs: Array<Route> = [
    {
        path: `/`,
        name: `app/index`,
        component: Lazy(startView)
    },
    {
        path: `/user/photo`,
        name: `user/photo`,
        component: Lazy(() => (
            import('./../views/user/photo')
        ))
    },
    {
        path: `/user/login`,
        name: `user/login`,
        component: Lazy(() => (
            import('./../views/user/login')
        ))
    },
    {
        lockPage:true,
        path: `/user/register`,
        name: `user/register`,
        component: Lazy(() => (
            import('../views/user/register')
        ))
    },
    {
        path: `/user/forgot`,
        name: `user/forgot`,
        component: Lazy(() => (
            import('./../views/user/forgot')
        ))
    },
    {
        path: `/user/general`,
        name: `user/general`,
        component: Lazy(() => (
            import('./../views/home/me/general')
        ))
    },
    {
        path: `/user/about`,
        name: `user/about`,
        component: Lazy(() => (
            import('./../views/home/me/about')
        ))
    },
    {
        path: `/user/seeking`,
        name: `user/seeking`,
        component: Lazy(() => (
            import('./../views/home/me/seeking')
        ))
    },
    {
        path: `/user/myBasic`,
        name: `user/seeking`,
        component: Lazy(() => (
            import('./../views/user/myBasic')
        ))
    },
    {
        path: `/home`,
        name: `home`,
        component: Lazy(() => (
            import('./../views/home')
        ))
    },
    {
        path: `/filter`,
        name: `filter`,
        component: Lazy(() => (
            import('./../views/home/filter')
        ))
    },
    {
        path: `/message`,
        name: `message`,
        component: Lazy(() => (
            import('./../views/home/message/room')
        ))
    },
    {
        path: `/connection`,
        name: `connection`,
        component: Lazy(() => (
            import('./../views/home/connection')
        ))
    },
    {
        outJmp:true,
        path: `/profile/:userId`,
        name: `profile/:userId`,
        component: Lazy(() => (
            import('./../views/profile')
        ))
    },
    {
        path: `/basic`,
        name: `basic`,
        component: Lazy(() => (
            import('./../views/user/basic')
        ))
    },
    {
        path: `/verify`,
        name: `verify`,
        component: Lazy(() => (
            import('./../views/verify')
        ))
    },
    {
        path: `/location`,
        name: `location`,
        component: Lazy(() => (
            import('./../views/location/content')
        ))
    },

    {
        path: `/setting`,
        name: `setting`,
        component: Lazy(() => (
            import('./../views/setting')
        ))
    },
    {
        path: `/setting/email`,
        name: `setting/email`,
        component: Lazy(() => (
            import('./../views/setting/email')
        ))
    },
    {
        path: `/setting/password`,
        name: `setting/password`,
        component: Lazy(() => (
            import('./../views/setting/password')
        ))
    },
    {
        path: `/setting/deleteAccount`,
        name: `setting/deleteAccount`,
        component: Lazy(() => (
            import('./../views/setting/deleteAccount')
        ))
    },
    {
        path: `/setting/feedback`,
        name: `setting/feedback`,
        component: Lazy(() => (
            import('./../views/setting/contact')
        ))
    },
    {
        path: `/setting/blockMember`,
        name: `setting/blockMember`,
        component: Lazy(() => (
            import('./../views/setting/blockUser')
        ))
    },
    {
        path: `/setting/notifications`,
        name: `setting/notifications`,
        component: Lazy(() => (
            import('./../views/setting/notifications')
        ))
    },
    {
        path: `/setting/about`,
        name: `setting/about`,
        component: Lazy(() => (
            import('./../views/setting/about')
        ))
    },
    {
        path: `/iap/upgrade`,
        name: `iap/upgrade`,
        component: Lazy(() => (
            import('../views/iap/upgrade')
        ))
    },
    {
        path: `/report`,
        name: `report`,
        component: Lazy(() => (
            import('../views/report')
        ))
    },
    {
        path: `/report/submit`,
        name: `report`,
        component: Lazy(() => (
            import('../views/report/submit')
        ))
    },
    {
        path: `/terms`,
        name: `terms`,
        component: Lazy(() => (
            import('../views/webPage/terms')
        ))
    },
    {
        path: `/privacy`,
        name: `privacy`,
        component: Lazy(() => (
            import('../views/webPage/privacy')
        ))
    }
]

export default configs;